<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var n = 10;
        var m = 20;
        var funcA = function(resolve) {
            setTimeout(function() {
                console.log(n + m);
                resolve("随便一些数据");
            }, 500)
        }
        var funcB = function(resolve) {
            setTimeout(function() {
                console.log((n + m) * 3);
                resolve("随便一些数据");
            }, 500)
        }
        var funcC = function(resolve) {
            setTimeout(function() {
                console.log((n + m) * 3 - 6);
                resolve("随便一些数据");
            }, 500)
        }
        new Promise(funcA).then(funcB).then(funcC);
    </script>
</body>

</html>